package com.study.ssm.factory02;

import com.study.ssm.factory.bean.Person;
import com.study.ssm.factory02.beanpost.Category;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author zhoujunlin
 * @date 2023年07月20日 19:19
 * @desc
 */
public class TestApplicationContext01 {

    ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("/factory02/applicationContext01.xml");

    @Test
    public void test01() {
        Product product = ctx.getBean("product", Product.class);
        ctx.close();
    }

    @Test
    public void test02() {
        Person person = ctx.getBean("person", Person.class);
        System.out.println(person);
    }

    @Test
    public void test03() {
        Category category = ctx.getBean("category", Category.class);
        System.out.println(category);
    }

}
